YandexAds

Class contains logic that applies to the Mobile Ads SDK as a whole. Right now, the only methods in it are used for enabling SDK logs, getting SDK version and enabling visibility error indicator.

Properties

Link copied to clipboard

Controls audio of ads rendered by the SDK — mute and volume for every ad format except In-Stream.

Link copied to clipboard

Returns the SDK version in the X.Y.Z format.

Functions

Link copied to clipboard

Enable or disable visibility error indicator in Debug Mode. Indicator is enabled by default.

Link copied to clipboard
fun enableLogging(enableLogging: Boolean)

Enables SDK logs. Logs are disabled by default.

Link copied to clipboard
fun initialize(context: Context, initializationListener: InitializationListener)

Initializes the Yandex Mobile Ads SDK internal state.

Link copied to clipboard

Sets the adapter identity for mediation. AdapterIdentity will be stored globally and automatically added to all requests. Call before initialize when using mediation adapters.

Link copied to clipboard
fun setAgeRestricted(ageRestricted: Boolean)

Set a value indicating whether user is a child or undefined age. If the value is set to true personal data will not be collected.

Link copied to clipboard

Enable or disable reporting for ad events that are automatically sent to AppMetrica for applications. App ad analytics enabled by default.

Link copied to clipboard

Enables location usage for ad loading. Disabled by default Location permission is still required to be granted additionally to the consent.

Link copied to clipboard

Set a value indicating whether user from GDPR region allowed to collect personal data which is used for analytics and ad targeting. If the value is set to false personal data will not be collected.

Link copied to clipboard

Launches SDK debug panel.